// ! Syscalls for schedle
// !
// ! - sched_yield

use crate::Syscall;
use linux_object::error::SysResult;

impl Syscall<'_>  {
        /// sched_yield()  causes  the calling thread to relinquish the CPU.  
        /// The thread is moved to the end of the queue for its static priority and a new thread gets to run.
        pub async fn sys_sched_yield(&self) -> SysResult {
            self.thread.yield_now().await;
            Ok(0)
        }

}